﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TaskTmpSet.aspx.cs" Inherits="manager_temt_TaskTmpSet" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>考评规则</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <section class="content-header">
        <h1>考评规则
            <small>模板设置</small>
        </h1>
        <ol class="breadcrumb">
            <li><a><i class="fa fa-dashboard"></i>主页</a></li>
            <li><a href="userManager.aspx">考评规则</a></li>
            <li class="active">固定任务</li>
        </ol>
    </section>

    <section class="content">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title" style="color: purple"><b><%=ttitle %></b></h3>
            </div>
            <div class="box-header with-border">
                <div>
                    <div class="col-md-12">
                        <a class="btn btn-success" href="TaskTmpSetDetail.aspx?id=<%=tid %>&type=<%=type %>&title=<%=ttitle %>&taskid=0">添加任务</a>
                        <a href="Default.aspx" class="btn btn-warning">返回</a>
                    </div>
                </div>
            </div>
            <div class="box-body">
                <table id="userManagerList" class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th></th>
                            <th>标题</th>
                            <th>时长</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="rptDeApply_1" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td><%# Eval("id") %></td>
                                    <td class="col-sm-9"><%# Eval("title") %></td>
                                    <td class="col-sm-1"><%# Eval("sc_d") %></td>
                                    <td class="col-sm-1"><%# Eval("isUsing").ToString().Trim()=="True"?"<span style='color:green'>可用</span>":"<span style='color:red'>不可用</span>" %></td>

                                    <td class="col-sm-1"><a style="cursor: pointer;" href="TaskTmpSetDetail.aspx?id=<%=tid %>&type=<%=type %>&title=<%=ttitle %>&taskid=<%# Eval("ID") %>">修改</a></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </div>          
        </div>
    </section>
    <div style="display: none">
        <input type="text" runat="server" id="RelId" />
    </div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="Server">
    <script>
        $(document).ready(function () {
            $("#userManagerList").DataTable(
                {
                    "columnDefs": [
                        { "targets": [0], "visible": false }
                    ],
                    "autoWidth": true,
                    "ordering": false,
                    "scroll": true,
                    "language": {
                        "url": "/reference/plugins/datatables/Chinese.json"
                    }
                });
        });

        $('#moduleManager').on('show.bs.modal', function (event) {
            var button = $(event.relatedTarget)
            $("#ContentPlaceHolder_hidBID").val("");
            var action = button.data('action');
            if (action == "update") {
                var browserID = button.data('bid');

                $("#userManagerLabel").text("修改规则");



                $("#ContentPlaceHolder_hidBID").val(browserID);
                $("#ContentPlaceHolder_btnGet").click();
            }
            else if (action == "add") {
                $("#userManagerLabel").text("新增规则");
            }

        })


    </script>
</asp:Content>

